import { useState } from "react"
import { getStorage } from "@/utils/storage";

export default function Page(){
  const [info, setInfo] = useState(getStorage('userInfo'));

  const setUserInfo = (userInfo: any) => {
    setInfo(userInfo);
  }
  const clearUserInfo = () => {
    setInfo(null);
  }

  return {
    userInfo: info,
    setUserInfo,
    clearUserInfo
  }
}